Release 10.1A: OpenEdge Development:
.NET Open Clients
Passing a TABLE or TABLE-HANDLE as an INPUT parameter
When the client application passes a static temp-table (
TABLEparameter) as anINPUTparameter, the client must provide an instance of the strongly typed DataTable class provided by ProxyGen. In this case, the definition of the temp-table is known at compile time, and the proxy already knows the schema (meta data) for the temp-table; therefore, the client application does not need to supply the schema, only the data. The client can add rows to the temp-table using theRows.Add()method on the strongly typed DataTable class.When the client application passes a dynamic temp-table (
TABLE-HANDLEparameter) as anINPUTparameter, the proxy does not know the schema (meta data) for the temp-table. In this case, the client must provide an instance ofSystem.Data.DataTablethat contains both the schema and data for theTABLE-HANDLEparameter. The client can use the methods on theSystem.Data.DataTableclass to add the schema and rows for the temp-table. The client can also pass aProgress.Open4GL.ProDataTable. For more information, see the "ProDataTable class" section.Also, the client might need to define Progress-specific mappings for the DataTable. See the "Providing Progress extensions for INPUT TABLE-HANDLE parameters" section.
Note: It is important that the schema field order defined for the .NET DataTable match the physical order defined for the temp-table in the 4GL. See the "Providing Progress extensions for INPUT TABLE-HANDLE parameters" section.Since all strongly typed DataTable classes inherit from
Progress.Open4GL.ProDataTablewhich in turn inherits fromSystem.Data.DataTable, these classes can be passed as anINPUTTABLE-HANDLEparameter, as long as the 4GL procedure is written to process the schema and data provided in the strongly typed DataTable class.For
INPUTparameters, all the data must be put into the parameter before the proxy call is made.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |